import metametamodel.MetaMetaModel;
import metametamodel.MetaMetaModelFileWrapper;
import util.ConstVariables;

import java.io.IOException;
import java.nio.file.Paths;
import java.util.List;

/**
 * @author Junzheng Chen
 * @date 2021/9/22 15:39
 */
public class Main {

    MetaMetaModel metaMetaModel;

    public void generateMetaModel(String path)
    {
        this.metaMetaModel.load(path);
        List<MetaMetaModelFileWrapper> parseRes =  this.metaMetaModel.parseClasses();
        this.metaMetaModel.generateMetaModelJavaFileByFileWrapper(parseRes);
    }

    public static void main(String[] args){
        Main main = new Main();
        main.metaMetaModel = new MetaMetaModel();
        main.generateMetaModel(Paths.get(ConstVariables.resourcesPath,ConstVariables.metaModelPathName,"meta_definition.xml").toString());

    }
}
